package rsschart;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * This was a test class...should be removed at some point.
 * 
 * @author Joe Hubert
 *
 */

public class ChartWriter extends HttpServlet {

	
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		StringBuilder str = new StringBuilder();
		str.append("<?xml version=\"1.0\" standalone=\"no\"?>");
		str.append("<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">");
		str.append("<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"400px\" height=\"300px\" viewBox=\"0 0 320 240\">");
		str.append("<text x=\"140\" y=\"15\" text-anchor=\"middle\" font-size=\"11\">Pets that Jen Wants</text>");
		str.append("<path d=\"M140,120 L140,40 A80,80 0 0,1 167.36,44.82 Z\" style=\"fill: #993333; stroke: black; stroke-width: 1\"/>");
		str.append("</svg>");
		
		response.getWriter().write(str.toString());

	}
	
	
	
	

}
